package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.exception.common.ApplicationException;
import org.apache.commons.lang3.StringUtils;

/**
 * @program: cashmama-trade-center
 * @description
 * @author: frank
 * @create: 2020-09-11 16:50
 **/
public class QueryTradeRORequest extends ParamsObject {

    /**
     * 用户code
     */
    private String userCode;
    /**
     * 产品类目
     */
    private String productCategory;

    public String getUserCode() {
        return userCode;
    }

    public QueryTradeRORequest setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public String getProductCategory() {
        return productCategory;
    }

    public QueryTradeRORequest setProductCategory(String productCategory) {
        this.productCategory = productCategory;
        return this;
    }

    @Override
    public void validate() {
        if(StringUtils.isBlank(userCode)){
            throw new ApplicationException("userCode can not be empty");
        }
    }
}
